package net.wanho.shop.mapper;

import net.wanho.shop.dto.GoodsDTO;
import net.wanho.shop.po.Goods;
import net.wanho.shop.vo.GoodsOneVO;
import net.wanho.shop.vo.GoodsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 商品表 Mapper 接口
 * </p>
 *
 * @author 猛虎王
 * @since 2024-12-24
 */
@Mapper
public interface GoodsMapper {

    List<Goods> select(Goods goods);

    GoodsOneVO selectById(Integer goodsId);

    void insert(Goods goods);

    void update(Goods goods);

    void deleteById(Serializable goodsId);

    void deleteByIds(String[] split);

    int selectByCatId(Integer catId);


    List<GoodsVo> find(GoodsDTO goodsDTO);

    void updateById(@Param("goodsId") Integer goodsId, @Param("goodsState") Integer goodsState);

    int selectCount();

//    舍弃的方法
//    boolean insertBatchPics(List<GoodsPics> pics);
//    boolean insertBatchAttrs(List<GoodsAttr> attrs);
}
